import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    uid: "",
    // 发布者ID
    author_id: "",
    // 发布者名字
    author: "",
  },
  getters: {},
  mutations: {
    // 传uid
    checkUid(state, val) {
      state.uid = val;
    },
    updataAuthorid(state, val) {
      state.author_id = val;
    },
    updataAuthor(state, val) {
      state.author = val;
    },
  },
  actions: {},
  modules: {},
});
